package top.someapp.dxf2dsvg.jfx;

import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.control.DialogPane;

/**
 * @author zwz
 * Created on 2020-04-26
 */
public class JfxDialog extends Dialog<ButtonType> {

    public JfxDialog() {
        super();
    }

    public JfxDialog(String fxml) {
        super();
        FxmlLoaderBuilder builder = new FxmlLoaderBuilder(fxml);
        DialogPane pane = new DialogPane();
        pane.setContent(builder.load());
        setDialogPane(pane);
        ButtonType okType = new ButtonType(I18N.getString("options.ok"), ButtonBar.ButtonData.OK_DONE);
        getDialogPane().getButtonTypes().addAll(okType);
    }
}
